const fs = require('fs')
const { feLinks ,sidebar} = require('./utils/createSideBar');


//部署站点的基础路径
const BASE_URL = '/note';

module.exports = {
  base: BASE_URL,
  title: '前端学习圈',
  description: 'vitePress生成的博客网站',
  head: [
    ['link', { rel: 'icon', type: 'image/x-icon', href: `${BASE_URL}/favicon.ico` }],
    ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0'}],
  ],
  themeConfig: {
    repo: 'https://gitee.com/zplucas/note',
    repoLabel: 'Gitee',
    docsBranch: 'master',
    editLinks: true,
    editLinkText: '在Gitee上编辑此页',
    lastUpdated: '上次更新：', //前缀使用
    // algolia: {
		// 	apiKey: 'd598aa41e372719ce27ef50d9ebcfbf0',
		// 	indexName: 'heny_h-web'
    // },
   
    nav: [
      { text: 'React', link: '/src/fe/react/' },
      { text: 'vue', link: '/src/fe/vue/' },
      { text: '面试题', link: '/src/fe/面试题/' },
      { text: 'node', link: '/src/fe/node/' },
      { text: 'fe', items: feLinks }
    ],
    sidebarDepth: 2,  //仅支持h2和h3标题
    sidebar,
  }
};
